#include "../../include/robot/FindBallAction.h"

FindBallAction::FindBallAction(float ballDegree):ArAction("FindBall", "Cerca la palla") {

	this->ballDegree = ballDegree;

}

FindBallAction::~FindBallAction() {

}

ArActionDesired* FindBallAction::fire(ArActionDesired currentDesired){

	myDesired.reset();
	myDesired.setVel(1);
	double toRotate = 5;
	if(ballDegree>0)
		toRotate = -5;

	myDesired.setDeltaHeading(toRotate);

	return &myDesired;

}
